#include <stdio.h>


//应该是传地址调用才能交换
void mySwap(int *a, int *b)
{
    int temp = *a;
    *a = *b;
    *b = temp;
}

int main()
{
    int a = 10;
    int b = 20;
    printf("a = %d, b = %d\n", a, b);
    mySwap(&a, &b);
    printf("a = %d, b = %d\n", a, b);
    return 0;
}